package com.google.code.solrdimension.querymodifiers;

import java.util.List;

import org.apache.solr.client.solrj.SolrQuery;

import com.google.code.solrdimension.config.DimensionConfigWrapper;
import com.google.code.solrdimension.parsers.exception.SolrDimensionException;

/**
 * The QueryModifer modifies the {@link SolrQuery} according to the {@link DimensionConfigWrapper}
 * 
 * @author Michael Chan 
 *
 */
public interface QueryModifier {
    
    /**
     * Prepare the {@link SolrQuery} according to the content of {@link DimensionConfigWrapper}
     * 
     * @param query
     *              This should be a new instance of {@link SolrQuery}, must not be null. The {@link SolrQuery} 
     *              object will then be modified according to the {@link DimensionConfigWrapper}
     * @param solrDimensionConfig
     *              An instance of {@link DimensionConfigWrapper}, must not be null
     * @throws SolrDimensionException
     *              If any of the expected params is not present
     *              
     * @return The modified Query
     */
    public SolrQuery prepareQuery(SolrQuery query, DimensionConfigWrapper solrDimensionConfig) throws SolrDimensionException;
    
}
